package com.isoft.demo.controller;

import com.isoft.demo.common.ResponseData;
import com.isoft.demo.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @ClassName:EmployeeController
 * @Description: TODO
 * @Author guowei
 * @Date:2021/7/2 11:38
 */
@RestController
@CrossOrigin
public class EmployeeController {
    @Autowired
    private EmployeeService service;

    @GetMapping("/searchSalary")
    public ResponseData searchSalary(){
        ResponseData rs = service.searchSalary();
        return rs;
    }

    @GetMapping("/searchSalaryById")
    public ResponseData searchSalaryById(int eid){
        ResponseData rs = service.searchSalaryById(eid);
        return rs;
    }

    @GetMapping("/searchByEpost")
    public ResponseData searchByEpost(){
        ResponseData rs = service.searchByEpost();
        return rs;
    }
    @GetMapping("/searchByepost")
    public ResponseData searchByepost(){
        ResponseData rs =service.searchByepost();
        return rs;
    }

}
